package com.qiang.demo02;

import java.util.Random;
import java.util.TreeSet;

public class Test02 {
    public static void main(String[] args) {
        /*
          测试TreeSet HashSet  ArrayList  LinkedList

//存入500万个随机的4个长度字符串

long start= System.curr();

long end= System.curr();

sout(end-start);

         */
        TreeSet<Integer> tst = new TreeSet<>();
        Random r = new Random();
        long l = System.currentTimeMillis();
        for (int i = 0; i < 5000000; i++) {
            int num = r.nextInt(10000) + 1000;
            tst.add(num);
        }
        long l1 = System.currentTimeMillis();
        System.out.println(l1 - l);
    }
}
